<template>
  <tr>
    <td><input type="checkbox" v-model="arr.checked" /></td>
    <td>{{ arr.name }}</td>
    <td>{{ arr.price }}</td>
    <td>
      <button @click="add(index)">+</button>{{ arr.num }}
      <button @click="des(index)">-</button>
    </td>
    <td>{{ arr.num * arr.price }}</td>
    <td><button>删除</button></td>
  </tr>
</template>

<script>
export default {
  props: ["arr", "index"],
  methods: {
    add(index) {
      this.$emit("addadd", index);
    },
    des(index) {
      this.$emit("desdes", index);
    },
  },
};
</script>

<style>
</style>